Optimal. Leaf size=50 \[ -\frac {\sqrt {2} a \text {ArcTan}\left (\frac {\sqrt {d} (1-\tan (e+f x))}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {d} f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {3613, 211}
\begin {gather*} -\frac {\sqrt {2} a \text {ArcTan}\left (\frac {\sqrt {d} (1-\tan (e+f x))}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {d} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3613
Rubi steps
\begin {align*} \int \frac {a+a \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx &=-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{2 a^2+d x^2} \, dx,x,\frac {a-a \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{f}\\ &=-\frac {\sqrt {2} a \tan ^{-1}\left (\frac {\sqrt {d} (1-\tan (e+f x))}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{\sqrt {d} f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.09, size = 74, normalized size = 1.48 \begin {gather*} -\frac {(1-i) \sqrt [4]{-1} a \left (\text {ArcTan}\left ((-1)^{3/4} \sqrt {\tan (e+f x)}\right )+i \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\tan (e+f x)}\right )\right ) \sqrt {\tan (e+f x)}}{f \sqrt {d \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(271\) vs.
\(2(41)=82\).
time = 0.25, size = 272, normalized size = 5.44
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 d}+\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 \left (d^{2}\right )^{\frac {1}{4}}}\right )}{f}\) | \(272\) |
default | \(\frac {a \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 d}+\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{4 \left (d^{2}\right )^{\frac {1}{4}}}\right )}{f}\) | \(272\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 80, normalized size = 1.60 \begin {gather*} \frac {a {\left (\frac {\sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} + \frac {\sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.13, size = 133, normalized size = 2.66 \begin {gather*} \left [\frac {\sqrt {2} a \sqrt {-\frac {1}{d}} \log \left (\frac {2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-\frac {1}{d}} {\left (\tan \left (f x + e\right ) - 1\right )} + \tan \left (f x + e\right )^{2} - 4 \, \tan \left (f x + e\right ) + 1}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, f}, \frac {\sqrt {2} a \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} {\left (\tan \left (f x + e\right ) - 1\right )}}{2 \, \sqrt {d} \tan \left (f x + e\right )}\right )}{\sqrt {d} f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \frac {1}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx + \int \frac {\tan {\left (e + f x \right )}}{\sqrt {d \tan {\left (e + f x \right )}}}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 232 vs.
\(2 (41) = 82\).
time = 0.62, size = 232, normalized size = 4.64 \begin {gather*} \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} + a {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{2 \, d^{2} f} + \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} + a {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{2 \, d^{2} f} + \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} - a {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{4 \, d^{2} f} - \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} - a {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{4 \, d^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.30, size = 65, normalized size = 1.30 \begin {gather*} \frac {{\left (-1\right )}^{1/4}\,a\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,\left (1-\mathrm {i}\right )}{\sqrt {d}\,f}+\frac {{\left (-1\right )}^{1/4}\,a\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,\left (-1-\mathrm {i}\right )}{\sqrt {d}\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________